<%@ page contentType="text/html; charset=UTF-8" isELIgnored="false"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ page import="java.util.*,com.aide.simplification.popedom.login.*" %>
<c:set var="path" value="${pageContext.request.contextPath}"></c:set>
<%@page import="org.apache.taglibs.standard.tag.common.core.ForEachSupport"%><html>
<head>
<title>转接中...</title>
<script type='text/javascript' src="../../dwr/engine.js"></script>
<script type='text/javascript' src="../../dwr/util.js"></script>
<script language="javascript" type="text/javascript"
	src="./js/dwrbase.js"></script>
<script language="javascript" type="text/javascript"
	src="../dwr/interface/UserInfo.js"></script>
<link href="../css/css.css" rel="stylesheet" type="text/css">
</head>
<body>
<%
String url="";
if(request.getParameter("url")!=null){
	url = request.getParameter("url");
}
String username="";
if(request.getParameter("username")!=null){
	username = request.getParameter("username");
}
String checkcode="";
if(request.getParameter("checkcode")!=null){
	checkcode = request.getParameter("checkcode");
}
LoginUser lu = new PopSSO(request,response).checkLogin(username,checkcode);
if(lu!=null){
	if("".equals(url)){
		%>
		<script type="text/javascript">
		top.window.location="${path}/index.jsp";
		</script>
		<%
	}else{
		Map<String,String> map=request.getParameterMap();
		if(!map.isEmpty()){
			url+="?";
		}
		for (Iterator<String> iterator = map.keySet().iterator(); iterator
				.hasNext();) {
			String key = iterator.next();
			if (iterator.hasNext()) {
				url+=key+"="+map.get(key).toString()+"&";
			} else {
				url+=key+"="+map.get(key).toString();
			}
		}
		%>
		<script type="text/javascript">
		top.window.location='${path}/<%=url%>';
		</script>
		<%
	}
}else{
	%>
	<script type="text/javascript">
	top.window.location='${path}/timeout.jsp';
	</script>
	<%
}
%>
</body>
</html>
